package servlet;

import com.google.gson.Gson;
import dao.ProductCategoyTwoServletDao;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.annotation.*;
import java.io.IOException;
import java.util.List;
import java.util.Map;

@WebServlet(name = "ProductCategoyTwoServlet", value = "/ProductCategoyTwoServlet.s")
public class ProductCategoyTwoServlet extends HttpServlet {
    ProductCategoyTwoServletDao dao = new ProductCategoyTwoServletDao();
    @Override
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

        List<Map<String, Object>> qureryname = dao.qureryname();

        String json = new Gson().toJson(qureryname);
        response.getWriter().print(json);

    }

    @Override
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

    }
}
